#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
void reverse(int n)
{
	while (n > 0)
	{
		int b = n % 10;
		n /= 10;
		printf("%d", b);
	}
}
int main()
{
	int n;
	scanf("%d", &n);
	reverse(n);
	return 0;
}